package barrier;

import java.awt.image.BufferedImage;

public class Water extends Barrier {
	public Water(int x, int y) {
		super(x, y);
	}

	private static BufferedImage[] images;
	static {
		images = new BufferedImage[30];
		for (int i = 0; i < images.length; i++) {
			if (i < images.length / 2)
				images[i] = loadImage("water" + 0 + ".png");
			else
				images[i] = loadImage("water" + 1 + ".png");
		}
	}
	private int index = 0;

	public BufferedImage getImage() {
		return images[index++ % images.length];
	}
}
